// DataDisplay.cpp
//
// This file implements a Form-derived class that
// implements the display window of the data window plug-in
/////////////////////////////////////////////////////////////
#include "StdAfx.h"

#using <system.windows.forms.dll>
#using <system.drawing.dll>
#using <system.dll>
#using "TlaNetInterfaces.dll"

#include "datadisplay.h"

using namespace System;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace Tektronix::LogicAnalyzer::TpiNet;
using namespace Tektronix::LogicAnalyzer::Common;


// The constructor initialializes the data window
// before it is shown.
DataDisplay::DataDisplay(void)
{
	InitializeComponent();
}


// Method used to dispose the data dipslay. The plug-in 
// calls this method when it is itself disposed.
void DataDisplay::Dispose( bool disposing )
{
	if( disposing )
	{
		if(m_components)
		{
			m_components->Dispose();
		}
	}
	__super::Dispose( disposing );
}


// This method initializes the size and position of controls 
// on the surface of the Form.
void DataDisplay::InitializeComponent()
{
	m_label1 = new Label();
	m_mainMenu1 = new MainMenu();
	m_menuItem1 = new MenuItem();
	m_menuItem2 = new MenuItem();
	SuspendLayout();
	// 
	// label1
	// 
	m_label1->Location = System::Drawing::Point(16, 16);
	m_label1->Size = System::Drawing::Size(360, 120);
	m_label1->TabIndex = 0;
	m_label1->Text = S"Place custom data display on the Form object";
	// 
	// mainMenu1
	// 
	m_mainMenu1->MenuItems->Add(m_menuItem1);
	// 
	// menuItem1
	// 
	m_menuItem1->Index = 0;
	m_menuItem1->MenuItems->Add(m_menuItem2);
	m_menuItem1->Text = S"CustomMenu";
	// 
	// menuItem2
	// 
	m_menuItem2->Index = 0;
	m_menuItem2->Text = S"Custom Menu Item";
	// 
	// DataDisplay
	// 
	AutoScaleBaseSize = System::Drawing::Size(6, 15);
	ClientSize = System::Drawing::Size(392, 154);
	Controls->Add(m_label1);
	Menu = m_mainMenu1;
	Text = "DataDisplay";
	ResumeLayout(false);
}